﻿//-----------------------------------------------------------------------
// <copyright file="AttachmentFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.AttachmentModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public static class AttachmentFactory
    {
        public static Attachment CreateAttachment(
                                    AttachmentIdentifier.AttachmentGroup attachmentGroup,
                                    int ownerID,
                                    string fileName,
                                    string fileUrl,
                                    bool isUsing,
                                    AttachmentIdentifier.CheckedStatus checkedStatus,
                                    bool isDeleted,
                                    int sort,
                                    DateTime editTime,
                                    string editUser)
        {
            Attachment attachment = new Attachment();
            attachment.AttachmentGroup = attachmentGroup;
            attachment.CheckedStatus = checkedStatus;
            attachment.EditTime = editTime;
            attachment.EditUser = editUser;
            attachment.FileName = fileName;
            attachment.FileUrl = fileUrl;
            attachment.IsDeleted = isDeleted;
            attachment.IsUsing = isUsing;
            attachment.OwnerID = ownerID;
            attachment.Sort = sort;
            attachment.CreateTime = DateTime.Now;

            return attachment;
        }
    }
}
